package com.exmaple.springcloud.controller;

import com.exmaple.springcloud.domain.R;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class PayAlibabaController{
    @Value("${server.port}")//获取端口并赋值给serverPort变量
    private String serverPort;

    @GetMapping(value = "/pay/nacos/{id}")
    public R getPayInfo(@PathVariable("id") Integer id){
        return R.ok("nacos registry, serverPort: "+ serverPort+"    id"+id,"成功");
    }
}